#include<iostream>
#include<fstream>
using namespace std;

class DataMake
{
	private : 
	int LowerBound, UpperBound, N;
	public:
	DataMake(int a, int b, int c)
	{
		LowerBound = a;
		UpperBound = b;
		N = c;
	}
	void OutF()
	{
		int i, j;
		j = 0;
		ofstream outf("Data.txt");
		for (i = 0; i < N; i++)
		{
			if(j != 5)
			{
				outf<<LowerBound+rand()%(UpperBound-LowerBound+1)<<"	";
				j++;
			}
			else
			{
				outf<<endl;
				outf<<LowerBound+rand()%(UpperBound-LowerBound+1)<<"	";
				j = 1;
			}
		}
		outf.close();
	}
};

main()
{
	int a, b, c;
	cout<<"Please input the lower bound:";
	cin>>a;
	cout<<endl;
	cout<<"Please input the upper bound:";
	cin>>b;
	cout<<endl;
	cout<<"Please input the numbers of this file:";
	cin>>c;
	cout<<endl;
	DataMake DM(a,b,c);
	DM.OutF();
	return 0;
}
